package cn.wolfcode.cms.query;


import com.alibaba.druid.util.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//高级查询
@Setter
@Getter
public class OrderBillQueryObject extends QueryObject {

    private String keyword;     //名称或电话查询

    private Long currentUserId = -1L;  //模拟数据权限控制用到的当前登录用户id
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GAM+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;     // 业务开始时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GAM+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;     // 业务开始时间

    private Long supplierId=-1L; // 供应商id 默认为-1

    public String getKeyword(){
        return StringUtils.isEmpty(keyword)? null : keyword;
    }

}
